#pragma once
#include ".\Lang\resource.h"

class CMainCommand : public saf::CNotifyCommandImpl<CMainCommand>
{
public:
	void OnNewFile();
	void OnHelp(UINT nCmdID, saf::ICommandItem *pCmdUI);
	void OnAppExit(UINT nCmdID, saf::ICommandItem *pCmdUI);
	void OnAbout(UINT nCmdID, saf::ICommandItem *pCmdUI);
	void OnViewThemeSetup();
	void OnViewSetupLanguage();
	void OnFounctionSplicationWnd(UINT nCmdID, saf::ICommandItem *pCmdUI);
	void OnToolsMacrosExplorer();

	BEGIN_NC_MAP()
		NC_COMMAND_ID_CMDUI(ID_APP_EXIT, OnAppExit)
		NC_COMMAND_ID_CMDUI(ID_HELP, OnHelp)
		NC_COMMAND_ID_CMDUI(ID_APP_ABOUT, OnAbout)
		NC_COMMAND_ID_CMDUI(ID_FUNCTION_SPLICATIONWND, OnFounctionSplicationWnd)
		NC_COMMAND_NULL(ID_FILE_NEW, OnNewFile)
		NC_COMMAND_NULL(ID_TOOLS_SETUP_THEME, OnViewThemeSetup)
		NC_COMMAND_NULL(ID_TOOLS_LANGUAGE, OnViewSetupLanguage)
		NC_COMMAND_NULL(ID_TOOLS_MACROSEXPLORER, OnToolsMacrosExplorer)
	END_NC_MAP()

	void OnQueryAppExit(saf::ICommandItem *pCmdUI);
	void OnQueryHelp(saf::ICommandItem *pCmdUI);
	void OnQueryAppAbout(saf::ICommandItem *pCmdUI);
	BEGIN_QUERY_STATE_MAP()
		QUERY_STATE_UI(ID_APP_EXIT, OnQueryAppExit)
		QUERY_STATE_UI(ID_HELP, OnQueryHelp)
		QUERY_STATE_UI(ID_APP_ABOUT, OnQueryAppAbout)
		//QUERY_STATE_ENABLE(ID_TOOLS_LANGUAGE)
		//QUERY_STATE_ENABLE(ID_TOOLS_SETUP_THEME)
		//QUERY_STATE_ENABLE(ID_FILE_NEW)
		//QUERY_STATE_ENABLE(ID_EDIT_COPY)
		//QUERY_STATE_ENABLE(ID_EDIT_CUT)
		//QUERY_STATE_ENABLE(ID_FUNCTION_SPLICATIONWND)
	END_QUERY_STATE_MAP()

	CMainCommand(void);
	~CMainCommand(void);
};

